<template>
  <div>
    <div class="row">
      <Banner/>
    </div>
    <div class="row">
      <div class="col-xs-2 col-xs-offset-2">
        <div class="list-group">
          <!--原始使用<a>标签跳转多个页面,多页面应用-->
         <!-- <a class="list-group-item active" href="./about.html">About</a> -->
         <!-- <a class="list-group-item" href="./home.html">Home</a> -->
          <!--
            vue中借助router-link标签实现路由的切换，
            to属性指定路由跳转路径， active-class属性指定路径被激活时的样式
            -->
            <!--使用命名路由跳转，to只能用对象写法-->
          <router-link class="list-group-item" active-class="active" :to="{name:'guanyu'}">About</router-link>
          <router-link class="list-group-item" active-class="active" to="/home">Home</router-link>
        </div>
      </div>
      <div class="col-xs-6">
        <div class="panel">
          <div class="panel-body">
            <!--
              router-view标签确定视图的位置，由路由规则确定展示什么组件
              /about路径时展示组件标签<About/>;/home路径时展示组件标签<Home/>
            -->
            <router-view>
            </router-view>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Banner from './components/Banner.vue'
export default {
  name: "App",
  components: {
    Banner,
  }
}
</script>
<style lang="css" scoped>

</style>